// F = 9.0 / 5.0 * C + 32.0

#include <iostream>

int main() {
    using std::cout;
    cout << "\n把100°C转换成212°F的两种方法";
    cout << "\n100摄氏度是212华氏度\n";

    double celsius = 100.0;
    double farenOK = 9.0 / 5.0 * celsius + 32.0;
    cout << "\n使用正确编码 9.0 / 5.0 ==> F = " << farenOK;

    double farenNG = 9/5 * celsius + 32.0;
    cout << "\n\n使用错误编码 9/5 ==> F = " << farenNG;

    cout << "\n\n真是失之毫厘，谬之千里！";
}

// g++ -fexec-charset=GBK ch02/2_7.cpp && ./a